<template>
	<view>
		<view class="zhanwei">
			
		</view>
		<view class="top-nav">
			<view class="status_bar" :style="{height:statusBarHeight + 'px'}"></view>
			<view class="nav-header" :style="{height:navigationBarHeight + 'px'}">
				<view class="view_1">
					<text class="ri-arrow-left-s-line icon" @click="back"></text>
					<text class="t1">新增收货地址</text>
				</view>
			</view>
		</view>


		<view class="view_2">
			<view class="view_2_1">
				<text>联系人</text>
				<input class="inp1" type="text" value="" placeholder="收货人姓名" />
			</view>

			<view class="button_1">
				<button class="butt" id="btn_2" type="mini" @click="change_1" :class="isfalse==0?'active':''">先生</button>
				<button class="butt" id="btn_3" type="mini" @click="change_2"
					:class="isfalse==1?'active':''">女士</button>
			</view>

			<view class="view_2_1">
				<text>手机号 </text>
				<input class="inp1" type="text" value="" placeholder="收货人手机号" />
			</view>

			<view class="view_2_1">
				<text>收货地址</text>
				<input class="inp2" type="text" value="" placeholder="请输入收货地址" />
				<text class="ri-arrow-right-s-line" id="icon_1"></text>
			</view>

			<view class="xiangxi">
				<text>详细地址</text>
				<input class="inp2" type="text" value="" placeholder="例:7号楼8层101室" />
			</view>
		</view>
		<button @click="toAddAdress" plain="true" id="btn_1" type="default">保存地址</button>



	</view>
</template>

<script>
	export default {
		data() {
			return {
				statusBarHeight: 0,
				navigationBarHeight: 0,
				menuButtonHeight: 0,
				navigationBarAndStatusBarHeight: 0,

				isfalse: 0
			}
		},
		methods: {
			getSystemInfo() {

				this.statusBarHeight = uni.getStorageSync('statusBarHeight');
				this.navigationBarHeight = uni.getStorageSync('navigationBarHeight');
				this.menuButtonHeight = uni.getStorageSync('menuButtonHeight') + 'px';
				this.navigationBarAndStatusBarHeight = uni.getStorageSync('statusBarHeight') + uni.getStorageSync(
					'navigationBarHeight') + 'px';
				console.log(this.navigationBarHeight)
			},
			change_1() {
				
				this.isfalse = 0;
				console.log(this.isfalse)
			},
			change_2() {
				this.isfalse = 1;
				console.log(this.isfalse)
			},
			// 返回
			back(){
				uni.navigateTo({
					url:"/pages/My/address"
				})
			},
			// 保存地址
			toAddAdress(){
				uni.navigateTo({
				   url:"/pages/My/address"
				});
			}

		},
		mounted() {
			this.getSystemInfo();

		}

	}
</script>

<style lang="less">
	.zhanwei{
		width: 750rpx;
		height: 100rpx;
		background-color: #FFFFFF;
	}
	.status_bar {
		width: 100%;
	}

	.top-nav {
		background: #FFFFFF;
		
		// margin-top: 200rpx;
		// line-height: 400rpx;
	}

	.view_1 {
		display: flex;
		align-items: center;
		width: 350rpx;
		height: 50rpx;
		background: #FFFFFF;
		margin: 0rpx 0 0 40rpx;
		// margin-top: 180rpx;

		.icon {
			margin-top: -3rpx;
			font-size: 60rpx;
		}

		.t1 {
			letter-spacing: 2rpx;
			margin-bottom: 10rpx;
		}
	}

	page {
		background: #F1F1F1;
	}

	.view_2 {
		width: 750rpx;
		height: 520rpx;
		background: #FFFFFF;
		margin-top: 20rpx;

		.view_2_1 {
			display: flex;
			width: 680rpx;
			height: 80rpx;
			border-bottom: 1px solid #C0C0C0;
			margin-left: 30rpx;
			padding-top: 30rpx;
			background: #FFFFFF;

			text {
				font-size: 26rpx;
				padding-top: 19rpx;
			}
		}

		.xiangxi {
			display: flex;
			width: 680rpx;
			height: 80rpx;
			margin-left: 30rpx;
			padding-top: 30rpx;

			text {
				font-size: 26rpx;
				padding-top: 19rpx;
			}

			input {
				font-size: 26rpx;
				margin-left: 60rpx;
				height: 80rpx;
			}
		}
	}

	#btn_1 {
		border: none;
		border: 1px solid #3e826a;
		font-size: 30rpx;
		margin-top: 50rpx;
		background: #3e826a;
		color: #FFFFFF;
		width: 600rpx;
		height: 90rpx;
	}

	.button_1 {
		display: flex;
		margin-top: 20rpx;
		margin-left: -114rpx;

		#btn_2 {
			width: 110rpx;
			height: 61rpx;
			font-size: 25rpx;
			margin-right: 10rpx;
			border: none;
			border: 1px solid #007f61;
			
		}

		#btn_3 {
			width: 110rpx;
			height: 61rpx;
			font-size: 25rpx;
			margin-left: 10rpx;
			border: none;
			border: 1px solid #007f61;
			
		}
	}
	.butt{
		color: #005500;
	}
	
	.active {
		background: #007f61;
		color: #FFFFFF;
	}
	
	#icon_1{
		font-size: 40rpx;
		margin-left: 140rpx;
		color: #C0C0C0;
	}
	.inp1{
		font-size: 26rpx;
		margin-left: 94rpx;
		height: 80rpx;
		// width: 300rpx;
		border-bottom: 1px solid #C0C0C0;
	}
	.inp2 {
		font-size: 26rpx;
		margin-left: 70rpx;
		height: 80rpx;
		// width: 300rpx;
		border-bottom: 1px solid #C0C0C0;
	}
</style>
